﻿using System;

namespace We.Moonlight.Geometry
{
    public static class Conversion
    {
        /// <summary>
        /// Convert Degrees to Radians
        /// </summary>
        /// <param name="rad">the Angle in Radians</param>
        /// <returns>the Angle in Degrees</returns>
        public static double Rad2Deg(double rad)
        {
            return (rad * 360) / (2 * Math.PI);
        }
        /// <summary>
        /// Convert Radians to Degrees
        /// </summary>
        /// <param name="deg">the Angle in Degrees</param>
        /// <returns>the Angle in Radians</returns>
        public static double Deg2Rad(double deg)
        {
            return (2.0d * Math.PI * deg) / 360.0d;
        }
    }
}